{extend name="index:public" /}
{block name="style"}
<link rel="icon" type="image/png" href="/favicon.ico">
<!-- core CSS -->
<link href="__INDEX__/skr/Public/web/css/normalize.css" rel="stylesheet" />
<link href="__INDEX__/skr/Public/web/css/base.css" rel="stylesheet" />
<link href="__INDEX__/skr/Public/web/css/font.css" rel="stylesheet" />
<!-- page CSS -->
<link href="__INDEX__/skr/Public/web/css/style.css" rel="stylesheet" />
<link href="__INDEX__/skr/Public/web/css/other.css" rel="stylesheet" />
<link href="__INDEX__/skr/Public/widgets/responsive/responsive.css" rel="stylesheet" />
{/block}
{block name="main"}

  <!-- banner -->
  <div class="nbanner"><div class="ghost-center"><p><span class="size1">{$cateinfo['catename']}</span><span class="size2">{$cateinfo['other']}</span></p></div></div>
  <!-- 页面 -->
  <section class="sect_inner">
    <!-- 正文 -->
    <div class="wrap index_">
      <div class="box">
						<form action="{:url('forms')}" method="POST" id="form1">
            <span>姓名：</span><input name="name" type="text" id="name" class="ly-k-k" placeholder="您的姓名" >
						<span>电话：</span><input name="tel" type="text" id="tel" class="ly-k-k" placeholder="您的电话" >
						<span>地址：</span><input name="add" type="text" id="add" class="ly-k-k" placeholder="您的地址" >
						<span>邮箱：</span><input name="email" type="text" id="email" class="ly-k-k" placeholder="您的邮箱" >
						<span>留言：</span><textarea name="content" id="content" cols="70" rows="10" class="ly-k-k1" placeholder="您的留言" ></textarea>
						<input id="submit" type="submit" value="提交留言" style="float:left;  width:50%; height:32px; border:none; border-radius:0px; font-family:'微软雅黑'; font-size:14px; background:#f39d77; color:#000;">
            <div class="clear2"></div>
						</form>    
          			<script>
				$(document).ready(function (){
					$("#form1").submit(function (){
						if($("#name").val() == ''){
							alert('请添加姓名');
							$("#name").focus();
							return false;	
						}
						if($("#tel").val() == ''){
							alert('请添加电话');
							$("#tel").focus();
							return false;	
						}
						if($("#add").val() == ''){
							alert('请添加地址');
							$("#add").focus();
							return false;	
						}
						if($("#email").val() == ''){
						 alert("请添加邮箱！");
						 return false;
						}
						if(!$("#email").val().match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/))
						{
						 alert("邮箱格式错误！");
						 return false;
						}
						if($("#content").val() == ''){
							alert('请添加内容');
							$("#content").focus();
							return false;	
						}
						if($("#captcha").val() == ''){
							alert('请添加验证码');
							$("#captcha").focus();
							return false;	
						}

					})	
				})
			</script>
      </div>
    </div>
  </section>
  {/block}